﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace myNico.Converters
{
    class flagConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            switch (value.ToString())
	{   
                case "0":
                 return "暂停";
                    break;

                case "1":
                    return "下载中";
                    break;
                case "2":
                    return "完成";
                    break;
                case "-1":
                    return "发生错误";
                    break;
		default:
 break;
	}
            return "";

        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
